<?php

/**
 * Manage offer
 *
 * @package    letsManager
 * @subpackage form
 * @author     Jerome Fouilloy
 * @version    SVN: $Rev$
 */
abstract class PluginLetsUserOfferForm extends BaseLetsUserOfferForm
{
  public function setup()
  {
  	parent::setup();
  	$this->useFields(array ('name','category_id','id'));
  	
  	$context = $this->getOption('context');
  	$user = $context->getUser();
	$this->widgetSchema['category_id']->setOption('query', LetsMainCategoryTable::getQueryForUser($user,false));
	$this->widgetSchema['name']->setAttribute('class', 'formInputLarge');
    $this->setLabels();
  }

  /**
   * Set labels for each widgets
   */
  protected function setLabels()
  {
    $this->widgetSchema->setLabels(array(
            'name'  => 'Nom',
            'category_id'  => 'Categorie'
    ));
  }
}
